
#include "Interpolation.hpp"

int main(){
    std::cout<<"The Assignment E tests Newton Interpolation."<<std::endl<<std::endl;
    std::vector<double> x{0,6,10,13,17,20,28},y1{6.67,17.3,42.7,37.3,30.1,29.3,28.7},y2{6.67,16.1,18.9,15.0,10.6,9.44,8.89};
    Newton p1(x,y1),p2(x,y2);
    std::cout<<"Newton Interpolation p1(x)="<<p1.getPol()<<std::endl;
    std::cout<<"Newton Interpolation p2(x)="<<p2.getPol()<<std::endl;
    std::cout<<"(b) p1(43) = "<<p1.getPol()(43)<<", p2(43) = "<<p2.getPol()(43)<<std::endl;
    std::cout<<std::endl<<"--------------------Test succeeds.--------------------"<<std::endl<<std::endl;
    return 0;
}

